//
//  TopicDetailViewController.m
//  fmdb_demo
//
//  Created by rujia chen on 15/10/18.
//  Copyright (c) 2015年 dfrz. All rights reserved.
//

#import "TopicDetailViewController.h"
#import "BBSService.h"

@interface TopicDetailViewController ()
@property (weak, nonatomic) IBOutlet UIWebView *webView;

@end

@implementation TopicDetailViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self loadData];
}

- (void)loadData{
    [BBSService loadEssentialTopicDetail:self.topicModel success:^(NSData *data) {
        NSString *htmlString = [[NSString alloc]initWithData:data encoding:NSUTF8StringEncoding];
        [self.webView loadHTMLString:htmlString baseURL:nil];
    } networkFailBlock:^(NSError *error) {
        NSLog(@"%@",error.localizedDescription);
    }];
}

@end
